#!/bin/sh
#
install_nginx() {
	sudo apt install nginx 
	sudo gpasswd -a ${SUDO_USER} www-data
	sudo mkdir -p /srv/websites/mirrors/github.com
	sudo chgrp -R www-data /srv/websites
	sudo cp ./etc/nginx/sites-available/github /etc/nginx/sites-available/github 
	if [ ! -f /etc/nginx/sites-enabled/github ]; then
		sudo ln -s /etc/nginx/sites-available/github /etc/nginx/sites-enabled/github
	fi
	sudo systemctl reload nginx
}

